package com.lagou.edu.service.impl;

import com.lagou.edu.service.UserService;
import com.lagou.user.entity.Token;
import com.lagou.user.mapper.TokenMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private TokenMapper tokenMapper;

    @Override
    public boolean isRegistered(String email) {
        Token byEmail = tokenMapper.findByEmail(email);
        return byEmail != null;
    }
}
